Cherry-pick micro-pentest demo integration and API/CLI coverage docs from PRs 186, 187, 207#240
Conversation
…age docs Cherry-picked from PR #207 with fixes: - Add run_micro_pentest function to demo_sidecar.py - Integrate Micro Pentest phase into run_scenario and full_demo flows - Add Micro Pentest Verdict row to assessment summary - Add health probe for micro-pentest endpoint - Add docs/API_CLI_COVERAGE_ANALYSIS.md (243-endpoint mapping) - Add docs/ALDECI_PODCAST_SCRIPT.md (20-minute podcast script) - Fix CLI command count arithmetic (67 -> 69)
Original prompt from shiva |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="docs/API_CLI_COVERAGE_ANALYSIS.md">
<violation number="1" location="docs/API_CLI_COVERAGE_ANALYSIS.md:181">
P3: Evidence endpoint count is inconsistent with the two endpoints listed. Update the section header or add the missing endpoint.</violation>
<violation number="2" location="docs/API_CLI_COVERAGE_ANALYSIS.md:202">
P3: The Core Pipeline command count doesn’t match the 6 commands listed. Update the count or list the missing commands to avoid misleading documentation.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| --- | ||
|
|
||
| ## Evidence (3 endpoints) |
There was a problem hiding this comment.
P3: Evidence endpoint count is inconsistent with the two endpoints listed. Update the section header or add the missing endpoint.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/API_CLI_COVERAGE_ANALYSIS.md, line 181:
<comment>Evidence endpoint count is inconsistent with the two endpoints listed. Update the section header or add the missing endpoint.</comment>
<file context>
@@ -0,0 +1,230 @@
+
+---
+
+## Evidence (3 endpoints)
+
+| # | Method | Endpoint | CLI Command | Stage |
</file context>
|
|
||
| | Category | Commands | Count | | ||
| | --- | --- | --- | | ||
| | Core Pipeline | `run`, `make-decision`, `ingest`, `analyze`, `stage-run`, `get-evidence` | 11 | |
There was a problem hiding this comment.
P3: The Core Pipeline command count doesn’t match the 6 commands listed. Update the count or list the missing commands to avoid misleading documentation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/API_CLI_COVERAGE_ANALYSIS.md, line 202:
<comment>The Core Pipeline command count doesn’t match the 6 commands listed. Update the count or list the missing commands to avoid misleading documentation.</comment>
<file context>
@@ -0,0 +1,230 @@
+
+| Category | Commands | Count |
+| --- | --- | --- |
+| Core Pipeline | `run`, `make-decision`, `ingest`, `analyze`, `stage-run`, `get-evidence` | 11 |
+| Compliance | `compliance frameworks/status/gaps/report` | 4 |
+| Reports | `reports list/generate/export/schedules` | 4 |
</file context>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 447110960e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| payload = { | ||
| "cve_id": cve_id, | ||
| "target_url": "https://payments.example.com/api", | ||
| "service": "payments-api", |
There was a problem hiding this comment.
Send micro-pentest request in the API schema
The demo sends cve_id and target_url scalars when calling /api/v1/micro-pentest/run, but the API expects cve_ids and target_urls lists (see apps/api/micro_pentest_router.py:24-33). In a live demo pointing at a real API, FastAPI will return 422, so this function falls through to the demo fallback and never actually kicks off a micro-pentest.
Useful? React with 👍 / 👎.
| r = client.post("/api/v1/micro-pentest/run", json=payload) | ||
| if r.status_code == 200: | ||
| return r.json() |
There was a problem hiding this comment.
Accept 201 responses from micro-pentest run
The micro-pentest run endpoint returns HTTP 201 (see apps/api/micro_pentest_router.py and its tests), but this code only treats 200 as success. Even with a correct payload, a successful 201 response will be treated as a failure and replaced with the demo “inconclusive” result.
Useful? React with 👍 / 👎.
Summary
Cherry-picked useful changes from PRs #186, #187, and #207, consolidating the micro-pentest demo integration and documentation additions. PRs 186 and 187 were large (17k+ and 21k+ lines) with CI failures and known issues (frontend calling non-existent APIs, duplicate route prefixes), so this PR focuses on the clean, focused changes from PR 207.
Changes:
run_micro_pentest()function to demo sidecar with graceful fallback for missing endpoints (returns demo verdict on 404/501)/api/v1/micro-pentest/status/0docs/API_CLI_COVERAGE_ANALYSIS.md- comprehensive 243-endpoint API to CLI mappingdocs/ALDECI_PODCAST_SCRIPT.md- 20-minute product podcast scriptReview & Testing Checklist for Human
/api/v1/micro-pentest/runwhich may not exist yet. Confirm the fallback behavior (returning demo data on 404/501) is acceptable for demo purposes.python scripts/demo_sidecar.py run-scenario --cve CVE-2021-44228 --skip-uploadto verify the new micro-pentest phase displays correctlyRecommended test plan:
Notes
Summary by cubic
Integrates Micro Pentest into the demo sidecar with a safe 404/501 fallback and shows its verdict in the assessment summary. Adds API-to-CLI coverage docs and updates health probes; phase count is now 7.
New Features
Docs
Written for commit 4471109. Summary will update on new commits.